$cloud-water: #b4d9ef; //云水
$marrs-green: #01847f; //马尔思绿
$celadon: #63bbd0; //霁青
$yan-han: #4656b7; //燕颔
$yan-lan: #144a74; //鷃蓝
$wei-you: #2e317c; //蔚釉
$FF: "Courier New", Courier, monospace;
$border-style: solid black;
* {
  padding: 0;
  margin: 0;
  //盒子模型的计算方式 总大小
  box-sizing: border-box;
}

body {
  background-color: $marrs-green;
  font-size: 20px;
  font-weight: bold;
  font-family: $FF;

  p{
    margin: 10px auto;
    text-align: center;
  }

  #main {
    width: 360px;
    height: 420px;
    background-color: $cloud-water;
    margin: 10px auto;
    border: 10px $border-style;
    border-radius: 20px;
    display: flex; //开启弹性盒模型
    flex-flow: column; //主轴方向 竖直
    align-items: center; //辅轴居中
    justify-content: space-around;

    #stage {
      width: 304px;
      height: 304px;
      border: 2px $border-style;
      border-radius: 2px;
      position: relative;

      #snake {
        & > div {
          width: 10px;
          height: 10px;
          background-color: $yan-han;
          border: 1px solid $cloud-water;
          position: absolute;
          top: 0px;
          left: 0px;
        }
      }

      #food {
        width: 10px;
        height: 10px;
        position: absolute;
        top: 0px;
        left: 20px;
        display: flex;
        flex-flow: row wrap;//横向排列  换行
        background-color:$celadon;
        justify-content: space-between;//纵向
        align-items: center;//横向居中

        &>div{
          width: 4px;
          height: 4px;
          background-color: $wei-you;
          transform: rotate(45deg);//旋转45度
        }
      }
    }
    #score-panel {
      width: 280px;
      display: flex;
      justify-content: space-between;
    }
  }
}
